<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mdsproject/mds_logisticline/Mds_LogisticLine.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mdsproject/mds_logisticline/Mds_LogisticLine.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Mds_LogisticLine",
        setup() {
            const table = ref({
                key: "LogisticLineId",
                footer: "Foots",
                cnName: "物流路线管理",
                name: "mds_logisticline/Mds_LogisticLine",
                newTabEdit: false,
                url: "/Mds_LogisticLine/",
                sortName: "LogisticLineId"
            });
            const editFormFields = ref({"LineName":"","Enabled":"","FromSites":[],"ToSites":[],"MachineIds":[],"Remarks":""});
            const editFormOptions = ref([[{"title":"物流路线名称","field":"LineName"},
                               {"dataKey":"enabled","data":[],"title":"启用","field":"Enabled","type":"switch"}],
                              [{"dataKey":"MDS_LogisticSite","data":[],"title":"起始点位","field":"FromSites","colSize":12,"type":"selectList"}],
                              [{"dataKey":"MDS_LogisticSite","data":[],"title":"去向点位","field":"ToSites","colSize":12,"type":"selectList"}],
                              [{"dataKey":"BASE_Machine_Lgt","data":[],"title":"可执行设备","field":"MachineIds","colSize":12,"type":"selectList"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"LineName":""});
            const searchFormOptions = ref([[{"title":"物流路线名称","field":"LineName","type":"like"}]]);
            const columns = ref([{field:"LogisticLineId",title:"ID",type:"bigint",width:120,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"LineName",title:"物流路线名称",type:"string",link:true,width:160,showOverflowTooltip:true,align:"left"},
                       {field:"FromSites",title:"起始点位",type:"string",bind:{ key:"MDS_LogisticSite",data:[]},width:180,showOverflowTooltip:true,align:"left"},
                       {field:"ToSites",title:"去向点位",type:"string",bind:{ key:"MDS_LogisticSite",data:[]},width:180,showOverflowTooltip:true,align:"left"},
                       {field:"MachineIds",title:"可执行设备",type:"string",bind:{ key:"BASE_Machine_Lgt",data:[]},width:150,showOverflowTooltip:true,align:"left"},
                       {field:"Enabled",title:"启用",type:"sbyte",bind:{ key:"enabled",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
